package com.mydemo.design_pattern.create_type.abstract_factory;

/**
 * <p></p >
 *
 * @author liming1
 * @version $Id: ProducterFactory, v1.0 2019-09-18 11:33 liming1 Exp $
 */
public class ProducterFactory {

    public static AbstractFactory getFactory(String choice) {
        if (choice.equalsIgnoreCase("product1")) {
            return new Product1Factory();
        } else if (choice.equalsIgnoreCase("product2")) {
            return new Product2Factory();
        }
        return null;
    }
}
